﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Kooboo.Commerce.Services
{
    public class Product
    {
        public int Id
        {
            get;
            set;
        }

        public string Name
        {
            get;
            set;
        }

        public int BrandId
        {
            get;
            set;
        }

        public string BrandName
        {
            get;
            set;
        }

        public string Description
        {
            get;
            set;
        }

        public string SkuAlias
        {
            get;
            set;
        }

        public string[] Images
        {
            get;
            set;
        }

        public SaleInfo[] Sales
        {
            get;
            set;
        }

        public SpecInfo[] Specification
        {
            get;
            set;
        }

        public ReviewInfo[] Reviews
        {
            get;
            set;
        }

        public QuestionInfo[] Questions
        {
            get;
            set;
        }

    }

    /// <summary>
    /// sale information
    /// </summary>
    public class SaleInfo
    {
        public int Id
        {
            get;
            set;
        }

        public string Name
        {
            get;
            set;
        }

        public decimal Price
        {
            get;
            set;
        }

        public int Stock
        {
            get;
            set;
        }

        public string Sku
        {
            get;
            set;
        }

        public Item[] Items
        {
            get;
            set;
        }

        public Int32 DeliveryDays { get; set; }
    }

    /// <summary>
    /// Specification
    /// </summary>
    public class SpecInfo
    {
        public string Name
        {
            get;
            set;
        }

        public string Value
        {
            get;
            set;
        }
    }

    public class ReviewInfo
    {
        public int Id
        {
            get;
            set;
        }

        public StarLevel Rate
        {
            get;
            set;
        }

        public string Remark
        {
            get;
            set;
        }

        public DateTime CreateDate
        {
            get;
            set;
        }

        public bool IsPublished
        {
            get;
            set;
        }

        public ICustomer Customer
        {
            get;
            set;
        }

        public IOrder Order
        {
            get;
            set;
        }
    }

    public class QuestionInfo
    {
        public int Id
        {
            get;
            set;
        }

        public string QuestionBy
        {
            get;
            set;
        }

        public string Question
        {
            get;
            set;
        }

        public string Answer
        {
            get;
            set;
        }

        public string AnsweredBy
        {
            get;
            set;
        }

        public DateTime? QuestionDate
        {
            get;
            set;
        }

        public string QuestionEmail
        {
            get;
            set;
        }

        public DateTime? AnswerDate
        {
            get;
            set;
        }
    }
}
